package com.liu.design.structure.decorate;

/**
 * @author LIU
 * @version 1.0
 * @date 2024/5/6 18:01
 * @description 包装类
 */
public class Decorate extends Drink {
    private final Drink drink;

    public Decorate(Drink drink) {
        this.drink = drink;
    }

    @Override
    public String getDes() {
        return drink.getDes() + " && " + super.getDes();
    }

    @Override
    public Float cost() {
        return drink.cost() + this.getPrice();
    }

}
